<template>
  <!--头部结束-->
  <!-- 轮播图 -->
  <!-- 轮播图 -->

  <div class="block banner">
    <el-carousel trigger="click" id="carousel">
      <el-carousel-item v-for="item in filteredData" :key="item.id">
        <h3 class="small"><img :src="item.Lbt" alt=""></h3>
      </el-carousel-item>
    </el-carousel>
    <Classify></Classify>
    <Hero></Hero>
  </div>

</template>

<script>
import Lear from './lear.vue'
import Hero from './hero.vue'
import Classify from './classify.vue'
import { mapState } from 'vuex'
export default {
  computed: {
    ...mapState(['Classify']),
    filteredData() {
      // 返回前8个项目
      return this.Classify.slice(12, 22);
    },

  },
  components: {
    Lear,
    Hero,
    Classify
  },
  data() {
    return {
      list: []
    }
  }
}
</script>

<style scoped>
@import url('../../assets/css/font_4367545_5vuckvup5pp/iconfont.css');


/* 轮播图开始*/
#carousel {
  width: 1226px;
  /* height: 500px; */
}

.banner {
  position: relative;
  margin: 0px auto;
  width: 1226px;
  height: 700px;
  background-color: #fff;
}

.banners {
  position: relative;
}

.el-carousel__item h3 {
  width: 100%;
  height: 100%;
  /* color: #475669; */
  font-size: 14px;
  opacity: 1;
  line-height: 150px;
  margin: 0;
}

.el-carousel__item h3 img {
  width: 100%;
  height: 100%;
  /* overflow: hidden; */
}
</style>